// src/store/apiSlice/uploadApiSlice.ts
import { apiSlice } from "@store/apiSlice/index";

export const uploadApiSlice = apiSlice.injectEndpoints({
    endpoints: (builder) => ({
        // 上传图片
        upload: builder.mutation<HealthResponse<Image>, FormData>({
            query: (body) => ({ url: "/upload", method: "POST", body }),
        }),
    }),
});

export const { useUploadMutation } = uploadApiSlice;
